/*
 This file 'header-datetime' is part of Firebird Integrated Solution 1.0

 Copyright (c) 2020 Lincong

 Contact:  
        Email: lincong1987@gmail.com

        QQ: 159257119
 
 See Usage at http://www.jplatformx.com/firebird

 Create date: 2020-06-15 16:11
 */

define(function (require, exports, module) {

	var $date = $(".header-menu-date");
	var $time = $(".header-menu-time");

	setInterval(function () {

		var now = new Date();

		$date.text(firebird.date.format({
			time: now,
			format: "$yyyy-$MM-$dd"
		}));
		$time.text(firebird.date.format({
			time: now,
			format: now.getSeconds() % 2 == 0 ? "$DCL $HH $mm $ss" : "$DCL $HH:$mm:$ss"
		}));

	}, 1000);


	module.exports = {};

})